package com.itheima.table01;

import com.itheima.MyUntils.MyUntil;
import com.itheima.bean.Card;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class Test01 {
    @Test
    public void selectAll(){
        SqlSession sqlSession = MyUntil.getSession();
        OneToOne oneToOne = sqlSession.getMapper(OneToOne.class);
        List<Card> cards = oneToOne.selectAll();
        for (Card card:cards) {
            System.out.println(card);
        }
        sqlSession.commit();
        sqlSession.close();
    }
}
